home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase v5.5 / MUSIC1.PAK / CATEGORS.WFM < prev    next >
Encoding:
Text File  |  1995-07-18  |  6.1 KB  |  201 lines

  1. *******************************************************************************
  2. *  PROGRAM:      Categors.wfm
  3. *
  4. *  WRITTEN BY:   Borland Samples Group
  5. *
  6. *  DATE:         1/94
  7. *
  8. *  UPDATED:      5/95
  9. *
  10. *  REVISION:     $Revision:   1.32  $
  11. *
  12. *  VERSION:      Visual dBASE
  13. *
  14. *  DESCRIPTION:  This form is a view of all the available music and other
  15. *                categories of items sold in the Musical Methods store.  You
  16. *                can view just a list of the available categories, or select
  17. *                to see a view of all the available items that belong to the
  18. *                selected category.
  19. *
  20. *  PARAMETERS:   None
  21. *
  22. *  CALLS:        Categors.qbe  (view of tables)
  23. *                Music.cc      (for custom pushbuttons)
  24. *                View.mnu      (menu file)
  25. *                View.pop      (popup file)
  26. *                Music.prg     (procedure file)
  27. *
  28. *  USAGE:        DO Categors.wfm
  29. *
  30. *******************************************************************************
  31. #include "Music.h"
  32.  
  33. create session
  34. set talk off
  35. set ldcheck off
  36.  
  37. ** END HEADER -- do not remove this line*
  38. * Generated on 06/19/94
  39. *
  40. parameter bModal
  41. local f
  42. f = new CATEGORSFORM()
  43. if (bModal)
  44.    f.mdi = .F. && ensure not MDI
  45.    f.ReadModal()
  46. else
  47.    f.Open()
  48. endif
  49. CLASS CATEGORSFORM OF FORM
  50.    Set Procedure to Music.cc additive
  51.    this.ReleaseOnClose = .F.
  52.    this.Minimize = .F.
  53.    this.MousePointer =          1
  54.    this.Maximize = .F.
  55.    this.HelpFile = "Music.hlp"
  56.    this.HelpId = "Categories"
  57.    this.Text = "Categories"
  58.    this.Width =         44.54
  59.    this.View = "CATEGORS.QBE"
  60.    this.Top =          1.73
  61.    this.MenuFile = "VIEW.MNU"
  62.    this.Left =         14.79
  63.    this.Height =         14.02
  64.    this.OnOpen = CLASS::ONOPEN
  65.    this.OnClose = CLASS::ONCLOSE
  66.    this.ColorNormal = "W"
  67.  
  68.    DEFINE RECTANGLE LISTRECT OF THIS;
  69.        PROPERTY;
  70.          Border .T.,;
  71.          BorderStyle          1,;
  72.          Text "",;
  73.          ColorNormal "W*/R",;
  74.          Width         41.82,;
  75.          Top          0.50,;
  76.          Left          1.19,;
  77.          Height          9.15
  78.  
  79.    DEFINE MUSICBUTTON ITEMSBUTTON OF THIS;
  80.        PROPERTY;
  81.          UpBitmap "RESOURCE #108",;
  82.          HelpFile "Music.hlp",;
  83.          HelpID "Items",;
  84.          Text "&Items...",;
  85.          ColorNormal "N/W",;
  86.          StatusMessage "Show available items matching the current selection.  Press F1 for Help.",;
  87.          Width         14.11,;
  88.          Default .T.,;
  89.          Top         11.94,;
  90.          Left         13.94,;
  91.          Height          1.50
  92.  
  93.    DEFINE CLOSEMBUTTON CLOSEFORMBUTTON OF THIS;
  94.        PROPERTY;
  95.          Width         14.11,;
  96.          Top         11.94,;
  97.          Left         28.73,;
  98.          Height          1.50
  99.  
  100.    DEFINE IMAGE LOGOIMAGE OF THIS;
  101.        PROPERTY;
  102.          DataSource "FILENAME SMLMUSIC.BMP",;
  103.          Width         10.71,;
  104.          Top          9.95,;
  105.          Left          1.19,;
  106.          Height          3.83,;
  107.          Alignment          2
  108.  
  109.    DEFINE LISTBOX DESCRIPTLIST OF THIS;
  110.        PROPERTY;
  111.          Visible .F.,;
  112.          DataSource "FIELD CATEGORS->DESCRIPT",;
  113.          FontSize          9.00,;
  114.          ColorHighLight "W+/R",;
  115.          ColorNormal "N/W*",;
  116.          Width         39.61,;
  117.          Top          1.78,;
  118.          Left          2.21,;
  119.          ID        800,;
  120.          Height          7.54
  121.  
  122.    DEFINE TEXT CATEGORYTEXT OF THIS;
  123.        PROPERTY;
  124.          Border .F.,;
  125.          Text " Music Categories :",;
  126.          ColorNormal "W/R",;
  127.          Width         19.55,;
  128.          Top          0.72,;
  129.          Left          1.87,;
  130.          Height          1.01,;
  131.          Alignment          3
  132.  
  133.    ****************************************************************************
  134.    PROCEDURE OnOpen
  135.    ****************************************************************************
  136.  
  137.    if _app.framewin.text = MUSIC_APP_TITLE    && If called from Music.prg
  138.       EnableViews(this)                       && enable viewing other items.
  139.       trackWindows.AddWindow(form)            && Keep track of open windows
  140.  
  141.    else                                       && otherwise
  142.       set procedure to Music.prg additive     && Make Music.prg procedure file
  143.    endif
  144.  
  145.    *** Define corresponding items (initially not visible)
  146.    DefineCorrespondingItems(form)
  147.  
  148.    *** View Window Settings
  149.    this.OnSize = SizeForm                     && Procedure in music.prg
  150.  
  151.    *** Assign the SpeedMenu for this form
  152.    set procedure to View.pop additive
  153.    this.popupMenu = new ViewPopup(this, "ViewPopup")
  154.  
  155.    *** Menu Settings
  156.    this.root.view.organization.enabled = .F.
  157.    this.root.view.organization.rank.enabled = .F.
  158.    this.root.view.organization.artist.enabled = .F.
  159.    this.root.view.organization.title.enabled = .F.
  160.    this.root.view.browse.enabled = .F.
  161.    this.popupMenu.organization.enabled = .F.
  162.    this.popupMenu.organization.rank.enabled = .F.
  163.    this.popupMenu.organization.artist.enabled = .F.
  164.    this.popupMenu.organization.title.enabled = .F.
  165.    this.popupMenu.browse.enabled = .F.
  166.    this.root.AssignWindowMenu()
  167.  
  168.  
  169.    * Link listbox to the unSKIPped list of parent records
  170.    this.descriptList.dataSource = "FIELD CATEGORS->DESCRIPT"
  171.    this.descriptList.visible = .T.            && Make it visible here so don't
  172.                                               && see flickering in form
  173.  
  174.    set skip to                                && Parent records shown only once
  175.    this.filter = .F.                          && no filter is set yet
  176.  
  177.    this.musicIsOpen = .F.                     && Corresponding items not visible
  178.                                               && yet
  179.  
  180.    this.itemsButton.OnClick = CorrespondingItems  && procedure in Music.prg
  181.  
  182.  
  183.    ****************************************************************************
  184.    PROCEDURE OnClose
  185.    ****************************************************************************
  186.  
  187.    if _app.framewin.text = MUSIC_APP_TITLE
  188.       trackWindows.DeleteWindow(form)
  189.    else
  190.       close procedure Music.prg
  191.    endif
  192.    close procedure Music.cc, View.pop
  193.  
  194.  
  195. ENDCLASS
  196.  
  197.  
  198.  
  199.  
  200.  
  201.